//
//  CYCollection.m
//  CreditAddressBook
//
//  Created by Lee on 15/10/15.
//  Copyright © 2015年 Lee. All rights reserved.
//

#import "CYCollection.h"
#import "MJExtension.h"

@implementation CYCollection

+ (NSDictionary *)replacedKeyFromPropertyName {
    return @{@"collectionId": @"id"};
}


/**
 *  model转字典时要设置
 *  [CYCollection referenceReplacedKeyWhenCreatingKeyValues:YES];
 *  才会调用
 *
 *  @param propertyName
 *
 *  @return
 */
+ (NSString *)replacedKeyFromPropertyName121:(NSString *)propertyName {
    if ([propertyName isEqualToString:@"collectionId"]) {
        return @"id";
    }
    return [propertyName underlineFromCamel];
}

- (id)newValueFromOldValue:(id)oldValue property:(MJProperty *)property {
    if (oldValue == nil) {
        return @"";
    }
    return oldValue;
}
@end
